﻿@model LbangCMS.Areas.Admin.Models.ContentListModel

<input type="hidden" id="CurentPageIndex" value="@Model.PageIndex" />
<input type="hidden" id="TotalPage" value="@Model.TotalPage" />
<table class="table datatable">
    <thead>
        <tr>
            <th data-width="65">#</th>
            <th>标题</th>
            <th data-width="100">是否发布</th>
            <th data-width="180">发布时间</th>
            <th data-width="150">操作</th>
        </tr>
    </thead>
    <tbody>
        @if (Model != null && Model.ContentList!=null&&Model.ContentList.Any())
        {
            foreach (var item in Model.ContentList)
            {
                <tr>
                    <td>
                        @item.ID
                        <input type="hidden" class="itemId" value="@item.ID" />
                    </td>
                    <td>@item.Title</td>
                    <td>@(item.Status?"是":"否")</td>
                    <td>@item.PublishTime</td>
                    
                    <td>
                        <a href="#" onclick="edit('@item.ID')">编辑</a>&nbsp;
                        <a href="#" onclick="remove_item('@item.ID')">删除</a>
                    </td>
                </tr>
            }
        }
    </tbody>
</table>

@if (Model == null || Model.ContentList == null || !Model.ContentList.Any())
{
    <div class="alert alert-info">@ViewBag.City 暂无新闻信息</div>
}